<?php $arr = $this->get('listDoType');?>
	<form method="post" onsubmit="return ajax_form(this)" action="<?php _e($this->module)?>" id="frm">
	
		<div class="x-list-title">
			<table width="100%" border="0" height="100%">
				<tr>
					<td align="left">
						<h2>Quản lý loại tài liệu</h2>
					</td>
					<td align="right">	
						<div class="x-list-options">
						<a onclick="load_inframe('<?php _baseUrl();?>/Admin/Document/add',{title: ' Thêm loại tài liệu ',id:'dipLight',css_content:{width:'450px'},auto_hidden: true })" class="x-button x-button-add">Thêm loại tài liệu</a>
							
						</div>
					</td>
				</tr>
			</table>	
		</div>

		<table width="100%" cellpadding="5" class="x-list" >
			<tr>
				<th align="center" width="25">TT</th>
				<th>
					<?php show_order_link('Tên loại','title','#Admin/Document',$vars) ;?>
				</th>
				<th width="150">
					<?php show_order_link('Ngày tạo','date_created','#Admin/Document',$vars) ;?>
				</th>
				<th width="150">
					<?php show_order_link('Người tạo','username','#Admin/Document',$vars) ;?>
				</th>
				<th width="25" colspan="2">Tác vụ</th>
			</tr>
			<?php
			if(count($arr)==0){
				echo "<tr><td colspan='11'><i>Chưa lưu nhóm nào được tạo.</i></td></tr>";
			}else{
				
				foreach( $arr as $b => $a ){?>
				<tr>
					<td align="center" width="25"><?php echo $b+1;?></td>
					<td>
						<?php _e($a['title'])?>
					</td>
					<td align="center"><?php _e(show_date(DATE_FORMAT,$a['date_created']));?></td>
					<td align="center"><a href="#Personnel/Index/View?ID=<?php echo $a['user_id']?>"><?php echo $a['username'];?></a></td>
					
					<td width="25" align="center">
						<a onclick="load_inframe('<?php _baseUrl();?>/Admin/Document/edit?ID=<?php echo $a['ID'];?>',{title: ' Thêm người dùng mới',css_content:{width:'450px'},auto_hidden: true })" class="x-edit"></a>
					</td>
					<td width="25" align="center">
						<a href="#Admin/Document/delete?ID=<?php _e($a['ID']);?>" class="x-delete"></a>
					</td>
				</tr>
			<?php }
			}
			?>
			<tr>
				<td colspan="7" class="page">
					<div class="x-page">
						<?php $this->e("pagebar");?>	
					</div>	
				</td>
			</tr>
		</table>
	</form>
